//Mon 04 Jan 2010 10:02:49 AM CST 
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

class TheSquareDivTwo
{
public:
	vector <string> solve(vector <string> board)
	{
		int N = board.size();
		vector<string> ret(N, string(N, '.'));
		vector<int> v(N, 0);
		for(int i=0; i<N; i++)
		{
			for(int j=0; j<N; j++)
			{
				if(board[i][j] == '.')
					v[i]++;
			}
		}
		for(int i=0; i<N; i++)
		{
			for(int j=0; j<N; j++)
			{
				if(j<v[i])
					ret[j][i] = '.';
				else
					ret[j][i] = 'C';
			}
		}
		return ret;
	}
};
